package com.exam.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
//描述返回对象的意义
@ApiModel("用户实体")
//value属性用来指定数据表名称
@TableName(value = "user")
public class User  implements Serializable {

    //对应数据库的主键（uuid,自增ID，雪花算法，redis,zookeeper)
    @TableId(type = IdType.AUTO)
    //用于方法、字段，表示对model属性的说明或者数据操作更改
    @ApiModelProperty(value = "主键 用户ID",example = "1")
    private Integer id;

    @ApiModelProperty(value = "用户角色id",example = "1(学生) 2(教师) 3(管理员)")
    private Integer roleId;

    @ApiModelProperty(value = "登录用户名",example = "wzz")
    private  String username;
    @ApiModelProperty(value = "真实用户名",example = "wzz")
    private  String trueName;

    @ApiModelProperty(value = "密码",example = "12345")
    private String password;

    @ApiModelProperty(value = "加密盐值",example = "salt")
    private String salt;

    @ApiModelProperty(value = "用户状态",example = "1正常 2禁用")
    private Integer status;

    @ApiModelProperty(value = "用户创建时间" ,example = "2024-4-10 10:35:44")
    private Date createDate;
}
